﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StevensReceipts.Repository;

namespace StevensReceipts.Web.Controllers
{
    public class ChartofAccountController : Controller
    {
        private readonly IReceiptsDataSource _db;
        //
        // GET: /ChartofAccount/

        public ChartofAccountController(IReceiptsDataSource db)
        {
            _db = db;
        }

        public ActionResult Index()
        {
            var categories = _db.CoaCategories.GetAll();


            ViewBag.AccountCategories = categories;

            var coas = _db.ChartofAccounts.GetAll();

            return View(coas);
        }
        [HttpGet]
        public ActionResult Create()
        {
            return View();
        }
    }
}
